home *** CD-ROM | disk | FTP | other *** search
- /*
- pcx.h
- partially based on "pcxtoppm.c" by Michael Davidson (1990).
-
- Ver.1.0 1995-05-02 T.Ogihara
- */
-
- #include <stdio.h>
- #include <libc.h>
- #include <objc/objc.h>
- #include "../common.h"
-
- #define pcxMAGIC 0x0a /* Magic number */
- #define sizeof_pcxHeader 128
- #define hasPALETTE 0x0c
- #define numPALETTE 256
-
- typedef struct {
- unsigned short x, y;
- unsigned char version, comp; /* version, compression */
- unsigned char bits; /* 1: 8dots/byte 4: 2dots/byte 8: 1dot/byte */
- unsigned char planes; /* Number of planes */
- short xbytes; /* bytes/line */
- short xpm, ypm; /* ratio x:y */
- short pinfo; /* palette info. */
- paltype *palette;
- unsigned char memo[MAX_COMMENT];
- } pcxHeader;
-
- pcxHeader *loadPcxHeader(FILE *, int *);
- void freePcxHeader(pcxHeader *);
- int pcxGetImage(FILE *, FILE *, pcxHeader *);
-